package org.lex.notepad.util.laf;

import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

import org.lex.swing.Swings;


public class LookAndFeelChangeListener implements PropertyChangeListener {
	private Iterable<? extends Component> components = null;

	public LookAndFeelChangeListener(Iterable<? extends Component> components) {
		super();
		this.components = components;
	}

	public void propertyChange(PropertyChangeEvent e) {
		if (e.getPropertyName().equalsIgnoreCase("lookAndFeel")) {
			Swings.updateComponentTreeUI(components);
		}
	}
}
